package main

import (
	"myapp/controller"
	"myapp/middleware"
	"net/http"
)

func main() {

	controller.RegisterRoutes()

	// http.ListenAndServeTLS("localhost:8080", "cert.pem", "key.pem", &middleware.CorsMiddleware{
	// 	Next: &middleware.TimeoutMiddleware{
	// 		Next: new(middleware.AuthMiddleware),
	// 	}})

	http.ListenAndServe("localhost:8080", &middleware.CorsMiddleware{
		Next: &middleware.TimeoutMiddleware{
			Next: new(middleware.AuthMiddleware),
		}})
}
